package com.dfbz.demo01;

import java.math.BigInteger;

/**
 * @author lscl
 * @version 1.0
 * @intro:
 */
public class Demo02_BigInteger常用方法 {
    public static void main(String[] args) {


        BigInteger num1 =new BigInteger("10");
        BigInteger num2 =new BigInteger("2");

        BigInteger add = num1.add(num2);
        System.out.println(add);

        BigInteger sub = num1.subtract(num2);
        System.out.println(sub);

        BigInteger multiply = num1.multiply(num2);
        System.out.println(multiply);

        BigInteger div = num1.divide(num2);
        System.out.println(div);

        BigInteger mod = num1.mod(num2);
        System.out.println(mod);

        int result = num1.compareTo(num2);
        System.out.println(result);

    }
}
